<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <lk-box :lessons="[1,2,4]"></lk-box>
    </div>
    <template id="box">
      <h3>{{brand}}</h3>
      <ul>
        <li v-for="item in lessons">{{item}}</li>
      </ul>
    </template>
    <script src="../js/vue.js"></script>

    <script>
      const box = {
        template:"#box",
        props:{//严格模式
          brand:{
            type:String,//string类型不能加:(动态绑定)
            require:true,
            default:"哟西"
          },
          lessons:{
            type:Array,
            require:true
          }
        }
      }

      //实例化vue
      const app = Vue.createApp({
       
        components:{
          'lk-box':box
        }
      }).mount("#app");
    </script>
  </body>
</html>